import { createApp } from 'vue'
import App from './App.vue'
// 2. 导入
import { createRouter, createWebHashHistory } from 'vue-router'

import Find from './views/Find.vue'
import Select from './views/Select.vue'
import Sort from './views/Sort.vue'

const app = createApp(App)
// 3. 创建
const router = createRouter({
  // 路由模式 -> 哈希模式 后面有 #
  history: createWebHashHistory(),
  // 5. 配置路由表规则
  routes: [{
    path: '/find',
    component: Find
  }, {
    path: '/select',
    component: Select
  }, {
    path: '/sort',
    component: Sort
  }]
})

// 4. 注册（使用）
app.use(router)

app.mount('#app')
